package cn.itsource.autoconfig;

import cn.itsource.config.RedisConfig;
import cn.itsource.config.SaTokenConfigure;
import cn.itsource.config.StpInterfaceImpl;
import cn.itsource.config.TokenInterceptor;
import cn.itsource.properties.SaTokenProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.redis.core.RedisTemplate;


/**
 * 📖：beishan
 * 🗓️：2024/4/1 9:56
 * =====================
 */
@Configuration
@Import({RedisConfig.class, SaTokenConfigure.class, TokenInterceptor.class})
public class SaTokenAutoConfiguration {

    @Bean
    public StpInterfaceImpl StpInterfaceImpl(RedisTemplate<String, Object> redisTemplate) {
        return new StpInterfaceImpl(redisTemplate);
    }

}
